package com.xbh.Book.dao.impl;

import com.xbh.Book.dao.OrderItemDao;
import com.xbh.Book.pojo.OrderItem;

/**
 * @program: JavaWebExer
 * @description:
 * @author: 许宝华
 * @create: 2021-05-03 14:45
 */

public class OrderItemDaoImpl extends BaseDao implements OrderItemDao {
    @Override
    public int saveOrderItem(OrderItem orderItem) {
        String sql="insert into t_order_item(`name`,`count`,`price`,`total_price`,`order_id`) values(?,?,?,?,?)";
        return update(sql,orderItem.getName(),orderItem.getCount(),orderItem.getPrice(),orderItem.getTotalPrice(),orderItem.getOrderId());
    }
}
